<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>核销记录</title>
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta http-equiv="Cache-Control" content="no-transform">
		<meta name="format-detection" content="telephone=no">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<link rel="stylesheet" href="style/css/basic.css" />
		<link rel="stylesheet" href="style/css/bound.css" />
		<script type="text/javascript" src="style/plugin/mui/js/mui.min.js"></script>
		<script type="text/javascript" src="style/js/jquery-1.8.3.min.js"></script>
		<script type="text/javascript" src="style/js/vue.min.js"></script>
		<script type="text/javascript" src="style/js/vue-resource.js"></script>
		<script type="text/javascript" src="style/js/basic.js"></script>
	</head>

	<body>
		<div id="record">
			<div id="header">
				<h1>入库核销记录</h1>
				<span class="backicon"></span>
			</div>
			<div class="body">
				<div class="record">
					<div class="flex">
						<div>总入库(瓶)<span>{{recordMsg.sale.total}}</span></div>
						<div>今日(瓶)<span>{{recordMsg.sale.d}}</span></div>
						<div>本周(瓶)<span>{{recordMsg.sale.w}}</span></div>
					</div>
					<div class="flex">
						<div>总核销(瓶)<span>{{recordMsg.check.total}}</span></div>
						<div>今日(瓶)<span>{{recordMsg.check.d}}</span></div>
						<div>本周(瓶)<span>{{recordMsg.check.w}}</span></div>
					</div>
				</div>
	
			</div>
		</div>
		<script>
			new Vue({
				el:"#record",
				data:{
					recordMsg:"",
					ticket:"",
					sign:""
				},
				methods:{
					
				},
				created:function(){
					this.ticket=localStorage.getItem("tick")
                    this.sign=localStorage.getItem("sig")
					this.$http.post(domain+"/scan/getSalerTotal?t="+this.ticket+"&sign="+this.sign,{ 
				      	type:"d,w"
				      },{emulateJSON:true}).then(
			            function (res) {
			                // 处理成功的结果
			                console.log(res.body)
			                if(res.body.code==1){
			                    this.recordMsg=res.body.data;
			                }else{
			                	mui.toast("暂无数据")
			                }
			            },function (res) {
			            // 处理失败的结果
			            console.log(res) 
			            }
			        )
				},
				mounted:function(){
					
				}
			})
		</script>
	</body>

</html>